package com.sijibao.gather.event.serialization;

import com.sijibao.gather.event.DriverCertifyRequestEvent;

public class DriverCertifyRequestEventSerializer extends CommonSerializer
		implements Serializer<DriverCertifyRequestEvent>
{
	/**
	 * 序列化顺序 用户编码<br>
	 * 类型<br>
	 * 时间<br>
	 */
	@Override
	public String serialize(DriverCertifyRequestEvent event)
	{
		StringBuilder sb = new StringBuilder();
		sb.append(stringSerialize(event.getUserCode()));
		sb.append(SEPARATOR);
		sb.append(event.getRequestType().value());
		sb.append(SEPARATOR);
		sb.append(timestampMsSerialize(event.getCreateTime()));
		sb.append(SEPARATOR);
		sb.append(doubleSerialize(event.getLongitude()));
		sb.append(SEPARATOR);
		sb.append(doubleSerialize(event.getLatitude()));
		sb.append(SEPARATOR);
		sb.append(event.getClientVersion());
		sb.append(SEPARATOR);
		sb.append(stringSerialize(event.getMobileModel()));
		sb.append(SEPARATOR);
		sb.append(stringSerialize(event.getDeviceCode()));
		return sb.toString();
	}

}
